package cn.lyq.card.data.model

import com.google.gson.annotations.SerializedName
import java.io.Serializable

class CashBackStageWrapInfo : Serializable {

    @SerializedName("goods_id")
    var goodsId = 0

    @SerializedName("title")
    var title: String? = null

    var list: MutableList<CashBackStageInfo>? = null

    var stage: String = ""

    fun getStageStr(): String {
        if (stage.isEmpty()) {
            list?.forEach {
                stage += "${it.getStage()}:${it.title}\n"
            }
            if (stage.isNotEmpty()) {
                stage = stage.substring(0, stage.length - 1)
            }
        }
        return stage
    }
}